package com.iot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import lombok.Data;

/**
 * 设备当前配置项表
 */
@Data
@TableName(value = "device_config")
public class DeviceConfig {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 设备ID
     */
    @TableField(value = "device_id")
    private String deviceId;

    /**
     * 配置项键
     */
    @TableField(value = "config_key")
    private String configKey;

    /**
     * 配置项当前值
     */
    @TableField(value = "config_value")
    private String configValue;

    /**
     * 配置状态：active/pending/fail/success
     */
    @TableField(value = "`status`")
    private String status;

    /**
     * 来源：platform/device
     */
    @TableField(value = "`source`")
    private String source;

    @TableField(value = "last_update_time")
    private Date lastUpdateTime;
}